import request from '@/utils/request'

export const listBusinessService = (params) => {
  return request({
    url: '/business/listBusinessByFoodTypeId',
    method: 'get',
    params: params
  })
}

export const getBusinessByIdService = (params) => {
  return request({
    url: `/business/${params.businessId}`,
    method: 'get'
  })
}

// 获取所有商家
export const listBusiness = () => {
  return request({
    url: '/business/list',
    method: 'get'
  })
}

// 搜索商家
export const searchBusiness = (keyword) => {
  return request({
    url: '/business/search',
    method: 'get',
    params: { keyword }
  })
}
